<template>
  <div class="content1">
    <el-row>
      <el-col :span="8">
        <div class="content1_item">
          <div
            class="item"
            v-if="data[0].odds[0].nav_data != ''"
            @click="
              dialogStore.openNewDialog(homeState.matchDetail.primaryData, data[0].odds[0].pk_odds_key, data[0].pk_ratio,data[0].odds[0].pk_ratio, 0)
            "
          >
            <div class="name">{{languageJson.home.win}}</div>
            <div class="num">{{ data[0].odds[0].odd }}</div>
          </div>
          <div class="item" v-else>
            <div class="imgs">
              <img src="@/assets/lock.png" style="width: 20px; height: 20px" alt="" />
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="content1_item">
          <div
            class="item"
            v-if="data[0].odds[2].nav_data != ''"
            @click="dialogStore.openNewDialog(homeState.matchDetail.primaryData, data[0].odds[2].pk_odds_key, data[0].pk_ratio,data[0].odds[2].pk_ratio, 2)"
          >
            <div class="name">{{languageJson.home.draw}}</div>
            <div class="num">{{ data[0].odds[2].odd }}</div>
          </div>
          <div class="item" v-else>
            <div class="imgs">
              <img src="@/assets/lock.png" style="width: 20px; height: 20px" alt="" />
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="content1_item">
          <div
            class="item"
            v-if="data[0].odds[1].nav_data != ''"
            @click="dialogStore.openNewDialog(homeState.matchDetail.primaryData, data[0].odds[1].pk_odds_key, data[0].pk_ratio,data[0].odds[1].pk_ratio, 1)"
          >
            <div class="name">{{languageJson.home.lose}}</div>
            <div class="num">{{ data[0].odds[1].odd }}</div>
          </div>
          <div class="item" v-else>
            <div class="imgs">
              <img src="@/assets/lock.png" style="width: 20px; height: 20px" alt="" />
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
const props = defineProps({
  data: Array,
})
const { homeStore, homeState } = inject('HomeStore')
const { dialogStore, dialogState } = inject('DialogStore')
const languageJson = inject('languageJson')
const languageType = inject('languageType')
</script>

<style lang="scss" scoped>
.content1_item {
  width: 100%;
  height: 40px;
  padding-right: 4px;
  margin-bottom: 8px;
}
.item {
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  align-items: center;
  cursor: pointer;

  .imgs {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .name {
    font-family: AlibabaPuHuiTi_2_55_;
    font-size: 14px;
    color: #000;
  }

  .num {
    font-family: DINAlternate;
    font-size: 14px;
    font-weight: bold;
    color: #3711d8;
  }
}
</style>

<style>
.content1 .el-col {
  padding: 0 !important;
}
</style>